package com.study.action;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.study.bean.ImgBean;
import com.study.bean.scBean;
import com.study.service.impl.AddCarItemService;
import com.study.tools.MyTools;

/**
 * Servlet implementation class Jiesuanaction
 */
@WebServlet("/Jiesuanaction")
public class Jiesuanaction extends HttpServlet {
	private static final long serialVersionUID = 1L;

	/**
	 * @see HttpServlet#service(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
			
		scBean adminB=MyTools.formToBean(request, scBean.class);
		int gengxin=MyTools.getInstance(AddCarItemService.class).getdeleteInfogengxin(adminB);	
		if(gengxin>0) {
			// 保存成功
		    
		  PrintWriter PW=response.getWriter();
		    PW.write(1);
		    PW.flush();
		    PW.close();
		}
	}

}
